﻿#region

using SqlSugar;
using Vin.Extension.Framework.Entities;
using Vin.Extension.SqlSugar.Attributes;

#endregion

namespace Vin.Extension.Framework.Login.Entities;

public class SysAccountBindInfo
{
    public string Name { get; set; }

    public SysAccountBindInfo(string name)
    {
        Name = name;
    }
}

/// <summary>
/// 账号绑定表
/// </summary>
[VinSqlSugarEntity("账号绑定")]
public class SysAccountBind : VinFrameworkBaseEntity
{
    /// <summary>
    /// 账号ID
    /// </summary>
    [SugarColumn(ColumnDescription = "账号ID")]
    public long? AccountId { get; set; }

    /// <summary>
    /// 绑定类型
    /// </summary>
    [SugarColumn(ColumnDescription = "绑定类型")]
    public string? BindType { get; set; }

    /// <summary>
    /// 外部绑定值
    /// </summary>
    [SugarColumn(Length = 1000, ColumnDescription = "外部绑定值")]
    public string? BindValue { get; set; }

    /// <summary>
    /// 绑定其他信息
    /// </summary>
    [SugarColumn(ColumnDescription = "绑定其他信息", IsJson = true, ColumnDataType = "json")]
    public SysAccountBindInfo? BindInfo { get; set; }

    /// <summary>
    /// 最后一次绑定时间
    /// </summary>
    [SugarColumn(ColumnDescription = "绑定时间")]
    public DateTime? BindTime { get; set; }
}